import './index.less'
import { useEffect, useState } from "react";
import React from "react";
import { Button, Checkbox, Form, Input } from 'antd';
import Dialog from "./Dialog";
export default function Moli(props) {
    const [isDialogOpen, setDialogOpen] = useState(false);
    const handleButtonClick = () => {
        setDialogOpen(true);
    }

    return <>
        <div className='dzpg-div' style={{
            width: 550,
            height: 320,
            position: 'absolute',
            top: 50,
            left: 10,
            bottom: 30,
            background: 'rgba(1,15,31,.5)',
            borderRadius: 8
        }}>
            <Form name='basic'
                labelCol={{
                    span: 5
                }}
                wrapperCol={{
                    span: 16,

                }}
                style={{
                    maxWidth: 500,
                    paddingTop: 20
                }}>
                <Form.Item label='经度' name='经度'
                    rules={[{
                        required: true,
                        message: '经度不能为空'
                    },
                    ]}>
                    <Input />
                </Form.Item>
                <Form.Item label='纬度' name='纬度'
                    rules={[{
                        required: true,
                        message: '纬度不能为空'
                    }]}>
                    <Input />
                </Form.Item>
                <Form.Item label='震级' name='震级'
                    rules={[{
                        required: true,
                        message: '震级不能为空'
                    }]}>
                    <Input />
                </Form.Item>
                <Form.Item label='震源深度' name='震源深度'
                    rules={[{
                        required: true,
                        message: '震源深度不能为空'
                    }]}>
                    <Input />
                </Form.Item>
                <Form.Item
                    wrapperCol={{
                        offset: 10,
                        span: 16
                    }}>
                    <Button type="primary" htmlType="submit" onClick={handleButtonClick}>确定</Button>
                    {
                        isDialogOpen && <Dialog />
                    }
                </Form.Item>
            </Form>



        </div>





    </>
}